import java.awt.Point;
import java.awt.Rectangle;


public class Block extends Entity {
	
	private boolean type; // TRUE = Unbreakable block, FALSE = Breakable block
	
	
	public Block(boolean type, int x, int y) {
		
		this.type = type;
		if(type)
			texture = ResourceManager.getManager().load("Resources/blockUnbreak.png");
		else
			texture = ResourceManager.getManager().load("Resources/blockBreak.png");
		
		setSize(60,60);
		this.bounds = new Rectangle(0,0,50,50);
		collider = new Collider<Block>(this);
		//collider.<Player>register(Player.class, "onPlayaHit");
		//collider.<Bomb>register(Bomb.class, "onBombHit");
		
		this.setPosition(x, y);
		
	}
	
	public void onBombHit() {
		if(!type)
			System.out.println("");//This block cannot be broken but should still stop players and also stop the explosion of bombs
		else {
			this.destroyBlock();
		}
	}
	
	public void onPlayaHit() {
		// TODO just stop the player
	}

	private void destroyBlock() {
		// TODO need images to simulate an explosion
		
	}
		
}
